<!doctype html>
<html manifest="app.manifest">

<head>
  <meta charset="utf-8">
  <title>西普会</title>
  <meta name="description" content="">
  <meta name="Keywords" content="">
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0,minimal-ui">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-touch-fullscreen" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  <meta name="format-detection" content="telephone=no,email=no">
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <!-- UC强制全屏 -->
  <meta name="full-screen" content="yes">
  <meta name="browsermode" content="application">
  <!-- QQ强制全屏 -->
  <meta name="x5-orientation" content="portrait">
  <meta name="x5-fullscreen" content="true">
  <meta name="x5-page-mode" content="app">


  <!--zepto框架-->
  <script src="js/jquery-1.8.3.min.js"></script>
  <script src="js/base.js"></script>

  <script>
    $(document).ready(function (e) {
      //判断是否app
      if (GetQueryString("from") == "app") {

      }
      //判断是否登录
      if (GetQueryString("userId") == null && localStorage.userId == null) {
        // window.location.href = "login.html";
      }

      if (localStorage.province) {
        $(".wz").html(localStorage.province);
        // alert(localStorage.userid);
      }

    });
  </script>

  <link href="css/style.css" rel="stylesheet">
  <link rel="stylesheet" href="css/swiper.min.css">


</head>

<body>



  <div class="nwrapper">


  </div>






  <!--插件-->
  <script src="js/swiper.jquery.min.js"></script>

  <!--数据-->


  <script src="js/url.js"></script>
  <script src="js/native.js"></script>



  <script>
    $(function () {

      $(".tab span").click(function () {
        $(".tab span").removeClass("active")
        $(this).addClass("active")
      })



      var TotalScoreParam = {};
      TotalScoreParam["index"] = "carsuit";

      $.ajax({
        url: URLS.SERVER_URL + URLS.advertise,//请求路径  
        type: 'GET',
        headers: {
          "serviceToken": localStorage.serviceToken
        },
        data: TotalScoreParam,
        success: function (data) {
          if (data.code == "-1") {
            var jsonParams = {
              'funName': 'newToken',
              'params': {
                'nav': "",
              }
            };
            native.nativeFun(jsonParams);
          }
          // console.log("data1",data);
          if (data.code == 1) {
            if (data.datas.length > 0) {
              let html = "";
              for (let a = 0; a < data.datas.length; a++) {

                if (data.datas[a].linkUrl != undefined) {
                  html += `<div title="${data.datas[a].title}" name="${data.datas[a].title}" class="swiper-slide"><span data-url="${data.datas[a].linkUrl}"><img title="${data.datas[a].title}" name="${data.datas[a].title}" src="${data.datas[a].cover}"></span></div>`
                } else {
                  html += `<div  title="${data.datas[a].title}" name="${data.datas[a].title}" class="swiper-slide"><img title="${data.datas[a].title}" name="${data.datas[a].title}"  src="${data.datas[a].cover}"></div>`
                }

              }
              $(".swiper-wrapper").html(html);

              var swiper = new Swiper(".mySwiper", {
                loop: true,
                pagination: {
                  el: ".swiper-pagination",
                },
              });

            }
          }




        }
      })



    })
  </script>


</body>

</html>